package net.interest.curation.model;

import java.io.Serializable;
import java.util.Date;

import org.slim3.datastore.Attribute;
import org.slim3.datastore.ModelRef;

import com.google.appengine.api.datastore.Key;

abstract public class SocialUser implements Serializable{

    private static final long serialVersionUID = -1985429313354923131L;

    @Attribute(primaryKey = true)
    private Key key;

    private ModelRef<User> userRef = new ModelRef<User>(User.class);

    private String screenName;

    @Attribute
    private String accessToken;
    @Attribute
    private String tokenSecret;
    
    private Date createdDate = new Date();

    /**
     * Returns the key.
     *
     * @return the key
     */
    public Key getKey() {
        return key;
    }

    /**
     * Sets the key.
     *
     * @param key
     *            the key
     */
    public void setKey(Key key) {
        this.key = key;
    }


    public ModelRef<User> getUserRef() {
        return userRef;
    }

    public Date getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }
    
    public String getScreenName() {
        return screenName;
    }

    public void setScreenName(String screenName) {
        this.screenName = screenName;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public String getTokenSecret() {
        return this.tokenSecret;
    }

    public void setTokenSecret(String tokenSecret) {
        this.tokenSecret = tokenSecret;
    }
    
    abstract public String getType();

}
